DockerCompose: support RPCDaemon local-mode#2392
DockerCompose: support RPCDaemon local-mode#2392AskAlexSharov merged 1 commit intoerigontech:develfrom mariuspod:devel
Conversation
… Fix some permissions issues in docker containers.
|
Amazing - I were need this help. I will test it on mac/win. |
|
We need try next thing: maybe instead of having host-machine UID - enough just have same UID in 2 containers. |
|
works on mac! |
|
I think we can go ahead with this solution:
|
|
I updated docs: #2394 |
|
@AskAlexSharov TBH I realized the PID issue by accident because I was running erigon and rpcdaemon in two separate terminals which was fine and then with docker-compose it was giving me the following error when acquiring the lock: So I figured it has something to do with the PID namespace and so I just gave it a try and it worked 😂 I added another PR #2397 which reduces the PID namespace to only see the You should recreate the containers so that PID mode is changed: I was trying to debug the What's the usual dev build workflow for rebuilding libmdbx for use in erigon locally ? Regarding the host's |
|
“That repo” is mine. |
|
You can fork “that repo” |
|
@AskAlexSharov yeah I thought about forking it but I wanted to have a local possibility to patch it. |
|
Just edit mdbx.c in your fork. And “go get” new version. You may try: «go mod vendor» in Erigon. It will move all dependencies to vendor folder - and maybe will make them editable. |
| - ${XDG_DATA_HOME:-~/.local/share}/erigon:/var/lib/erigon | ||
| ports: | ||
| - "8545:8545" | ||
| restart: unless-stopped |
I found out it's possible to set the PID namespace so that both
erigonandrpcdaemondocker containers share the same namespace. This has the nice side-effect that it's possible to use--datadiron both containers with a mounted volume because the mdbx lock is not exclusive anymore. This PR is an experimental workaround for runningrpcdaemonin dockerized Local-Mode.I've tested it on Ubuntu 18.04.5 LTS with a USB stick mounted as a volume and passed via
XDG_DATA_HOMEI've also changed the default user of the containers to either
$UID_GUIDenv or1000:1000as default if it's not set so that permissions are properly handled for the volume.So far it works pretty stable for me 👷